<?php

use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
| 资源控制器操作处理
| 动作	    URI	                    行为	    路由名称
| GET	    /photos	                index	photos.index
| POST	    /photos	                store	photos.store
| GET	    /photos/{photo}	        show	photos.show
| PUT/PATCH	/photos/{photo}	        update	photos.update
| DELETE	/photos/{photo}	        destroy	photos.destroy
|
| 生成控制器的时候指定资源模型
| php artisan make:controller PhotoController --resource --model=Photo
|
*/

Route::group([

    'middleware' => 'api',
    'prefix' => 'auth'

], function ($router) {
    Route::post('login', 'AuthController@login');
    Route::post('logout', 'AuthController@logout');
    Route::post('refresh', 'AuthController@refresh');
    Route::get('me', 'AuthController@me');
});
